import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;

public class demo8 {
    public static void main(String[] args) throws IOException {
        try (OutputStream outputStream = new FileOutputStream("d:/tmp/file/test.txt");){
            //一次写一个字节
            /*outputStream.write(97);
            outputStream.write(98);
            outputStream.write(99);
            outputStream.write(2888);*/
            //一次写数组内的多个字节
            byte[] bytes ={97,98,99,100,101,102};
            outputStream.write(bytes,2,3);
        }


    }



}
